﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Collections;
using GPCSC.Web;
using NickLee.Common;


namespace GPCSC.Web.QJQ
{
    public partial class QJQList : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string type = Usual.f_querystringToString("type");
                if (type == "del")
                {
                    deldatabound();
                }
                dataBound();
            }
        }
        protected void dataBound()
        {
            Model.CL_USER_S user = reuser();
            Hashtable htable = new Hashtable();
            htable.Add("@postid",user.CL_POSTID_PK.ToString());
            DataSet ds = new SqlReadXml().ReaderDataSet("select_CL_QJQ",htable);
            if (ds.Tables.Count > 0)
            {
                PostListS.DataSource = ds;
                PostListS.DataBind();
            }
        }
        protected void deldatabound()
        {
            SqlReadXml org = new SqlReadXml();
            Hashtable htable = new Hashtable();
            htable.Add("@Row_id", Usual.f_querystringToString("id"));
            org.NotDoSQL("del_CL_QJQ", htable);
            
        }
        protected Model.CL_USER_S reuser()
        {
            byte[] userInfo = (byte[])base.o_baseTable[c_obj.s_userInfo];
            Hashtable userInfoTable = CompressData.UnCompressHashtable(userInfo);
            Model.CL_USER_S users = (Model.CL_USER_S)userInfoTable["SYS_USER"];
            return users;

        }
    }
}